package com.ts.feign.api;

import com.ts.feign.dto.UserDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(name = "ts-content" ,path = "/user" ,contextId = "user")
public interface UserService {

    @GetMapping("/getUserByPhone/{phone}")
    public UserDTO getUserByPhone(@PathVariable String phone);

    @PostMapping("/addUser")
    UserDTO addUser(@RequestBody UserDTO userDTO);
}
